<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <title>jTranslate API test</title>
  <script type="text/javascript" src="jTranslate.min.js"></script>
  <script type="text/javascript">
   window.translateAPIkey = 'YOUR_API_KEY_HERE';
   window.translateProxyUrl = 'jTranslate.php';
   function init(){
    jeremy.language.translate(document.getElementById('testString').innerHTML,'en','de',callback);
   }
   function callback(response){
    try{
     document.getElementById('translatedTestString').innerHTML = response.data.translations[0].translatedText;
    }catch(err){
     alert('there was a problem translating');
     window.problematicResponse = response;
    }
   }
   window.onload = init;
  </script>
 </head>
 <body>
  <div id="testString">Hello, world!</div>
  <div id="translatedTestString">Loading...</div>
  <div id="translateControl"></div>
 </body>
</html>